

#if !defined(UPCOM_GW_GT)
#define UPCOM_GW_GT

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "gtlib.h"

#pragma pack(1)
typedef struct
{
	uint8  serIP[4];
	uint16 serPort;
	uint8  bakIP[4];
	uint16 bakPort;
	uint8  apn[16];
}ser_ipSt;
typedef struct
{
	uint8 terIP[4];
	uint8 netMark[4];
	uint8 defGW[4];
	uint8 proxyType;
	uint8 proxyIP;
	uint16 proxyPort;
	uint8 proxyCon;
	uint8 usrLen;
	uint8 user[20];
	uint8 pwLen;
	uint8 pw[20];
	uint16 terPort;
}ter_ipSt;
typedef struct
{
	uint8  mode;
	uint16 redialT;
	uint8  Tcnt;
	uint8  conT;
	uint8  xflag[3];
}tcp_paraSt;
typedef struct  
{
	uint16 sn;
	uint8 port:5,
		  baud:3;
	uint8 ptc;
	uint8 addr[6];
	uint8 pw[6];
	uint8 floa:2,
		  inter:2,
		  m:4;
	uint8 info[12];
}metx_paraSt;


typedef struct
{
	uint8  ip1[4];
	uint16 port1;
	uint8  ip2[4];
	uint16 port2;
	uint8  mask[4];
	uint16 mask_port;
	uint8  proxy[4];
	uint16 proxy_port;
	uint16 apn[16];
}gprs_paraSt;
#pragma pack()

#ifdef _WIN32
	#define UPDATA_TER			"./flash/updata.bin"
	#define UPDATA_IDX			"./flash/updata.idx"
	#define UPDATA_TER_UMOD		"./flash/ter_umod.bin"
	#define UPDATA_TER_DMOD		"./flash/ter_dmod.bin"
	#define UPDATA_SPU_ADR		"./flash/spu.lst"
	#define UPDATA_SPU			"./flash/spu.bin"
	#define UPDATA_SPU_MOD_ADR	"./flash/spu_mod.lst"
	#define UPDATA_SPU_MOD		"./flash/spu_mod.bin"
#else
	#define UPDATA_TER			"/flash/updata.bin"
	#define UPDATA_IDX			"/flash/updata.idx"
	#define UPDATA_TER_UMOD		"/flash/ter_umod.bin"
	#define UPDATA_TER_DMOD		"/flash/ter_dmod.bin"
	#define UPDATA_SPU_ADR		"/flash/spu.lst"
	#define UPDATA_SPU			"/flash/spu.bin"
	#define UPDATA_SPU_MOD_ADR	"/flash/spu_mod.lst"
	#define UPDATA_SPU_MOD		"/flash/spu_mod.bin"
#endif

int upcom_gw_process(uint8 nPort);

#endif





















